/**
 * Created by jiangyun on 15/12/29.
 */
moduleUtils.filter('cmCurrency', function () {
    return function (amount) {
        if (angular.isNumber(amount)) {
            amount = amount / 100;
            return decimal(amount, 2).toFixed(2) || 0.00;
        } else {
            var a = parseInt(amount);
            if (isNaN(a)) {
                return 0;
            } else {
                amount = amount / 100;
                return decimal(amount, 2).toFixed(2) || 0.00;
            }
        }

    };
});